package com.googlecode.framework.core.utils;

public class StringUtils extends org.springframework.util.StringUtils {

    public static boolean isEmpty(CharSequence value) {
        return !hasText(value);
    }
    
    public static String safeToTrim(String str) {
        return str == null ? null : str.trim();
    }

    public static String safeToUpperCase(String str, String ifNullDefaultValue) {
        return str == null ? ifNullDefaultValue : str.toUpperCase();
    }

    public static String safeToUpperCase(String str) {
        return safeToUpperCase(str, null);
    }

    public static String safeToLowerCase(String str, String ifNullDefaultValue) {
        return str == null ? ifNullDefaultValue : str.toLowerCase();
    }

    public static String safeToLowerCase(String str) {
        return safeToLowerCase(str, null);
    }
}
